﻿using System;
using System.Windows.Forms;

namespace QuailRepositoryManager
{
    public partial class FormAttach : Form
    {
        public FormAttach()
        {
            InitializeComponent();
        }

        public bool OK
        {
            get; set;
        }

        public string SessionId
        {
            get; set;
        }

        private void ButtonOk_Click(object sender, EventArgs e)
        {

            SessionId = TextBoxSessionId.Text.Trim();
            if (SessionId.Length != 32)
            {
                MessageBox.Show(this, "Please enter a valid 32-character session id");
                return;
            }

            OK = true;
            Hide();
        }

        private void FormAttach_Load(object sender, EventArgs e)
        {
        }

        private void ButtonCancel_Click(object sender, EventArgs e)
        {
            OK = false;
            Hide();
        }
    }
}
